package com.geekaca.news.mapper;

import com.geekaca.news.domain.NewsCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Peter
 * @description 针对表【tb_news_category】的数据库操作Mapper
 * @createDate 2024-02-16 16:50:15
 * @Entity com.geekaca.news.domain.NewsCategory
 */
@Mapper
public interface NewsCategoryMapper {


    int deleteByPrimaryKey(Long id);

    int insert(NewsCategory record);

    int insertSelective(NewsCategory record);

    NewsCategory selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(NewsCategory record);

    int updateByPrimaryKey(NewsCategory record);

    int getTotalCategories();

    List<NewsCategory> getAllCategory(@Param("start") Integer start, @Param("pageSize") Integer pageSize);


    int udateCatgory(@Param("cateGoryId") Integer categoryId, @Param("categoryName") String categoryName,
                     @Param("categoryIcon") String categoryIcon);

    int updateDelCatById(@Param("categoryId") Integer id);
}
